<?php
/*
 * LiveView English Language Controller
 * 
 * this file fills the template with data
 * 
 * @author : Jason Meulenhoff
 * @mail : mail@kacangboi.com
 * @web : http://kacangboi.com
 * @copyright : KacangNetworks 2010
 * 
 */

require_once "../../config.php";
isLogged();
sessionExpired();
readVideoDirectory();

if(isBreadCrumbSessionSet())
		addToList(getCurrentPage());
$chat = new chat();
$parser = new parser();
$parser->loadTemplate("../templates/language/english.html");
$parser->assignVars(array("title","logo","time"),array(PAGE_TITLE,"images/logo.png",date("H:i:s")));
$parser->assignVar("breadcrumb",displayBreadCrumb());
$parser->assignVar("username","{$_SESSION['logged']['name']}");
$parser->assignVar("menu",generateMenu());
$parser->assignVar("date",date("d-m-Y"));
$parser->assignVar("DETAILS","".selectedUrl()."".selectedpb("ENGLISH")."");
$parser->assignVar("switch","");
$parser->assignVar("chat_messages",$chat->readAllMessages());
if($_SESSION['admin'] == true)
	$parser->assignVar("value","admin");
else
	$parser->assignVar("value",$_SERVER['REMOTE_ADDR']);
if(selectedEnviroment() == "BOTH")
{
	$parser->assignVar("switch","Change Audio Language <a href='both_english.controller.php'><img border='0' src='../images/uk.png'/></a> | <a href='both_dutch.controller.php'><img border='0' src='../images/nl.png'/></a>");		
}

if(DISPLAY_FLOAT)
{
	$parser->assignVar("script","<script type=\"text/javascript\" src=\"../js/floatingbar.js\"></script>");
	$parser->assignVar("message","<img src='error.png'/> Application running in Development Mode");
}
else
{
	$parser->assignVar("script","");
}
	
$parser->parse(true);
?>